<template>
  <div class="wrap">
    <h3>当前定位</h3>
    <div class="item">深圳市</div>
    <h3>可选城市</h3>
    <div class="item" @click="select('深圳')">深圳</div>
    <div class="item" @click="select('广州')">广州</div>
    <div class="item" @click="select('东莞')">东莞</div>
    <div class="item" @click="select('佛山')">佛山</div>
    <div class="item" @click="select('厦门')">厦门</div>
    <div class="item" @click="select('泉州')">泉州</div>
    <div class="item" @click="select('南宁')">南宁</div>
    <div class="item" @click="select('南昌')">南昌</div>
    <p>更多城市火热陆续开放中</p>
  </div>
</template>

<script>
export default {
  data () {
    return {
    }
  },

  components: {
  },

  methods: {
      select(name) {
          // wx.setStorageSync('city', name)
          this.$router.go(-1)
      }
  },

  created () {
      this.$http.get(this.$store.state.ip+"/servicedomain/CommonServiceWeb/getSprayCity.action")
      .then(res => {
        console.log(res)
      }).catch(err => {
        console.log(err)
      })
  },
  mounted () {
  },
  // 生命周期函数--监听页面加载
  onLoad: function (options) {
    // console.log(options)
  },
  // 生命周期函数--监听页面初次渲染完成
  onReady: function () {
  },
  // 生命周期函数--监听页面显示
  onShow: function () {
  },
  // 生命周期函数--监听页面隐藏
  onHide: function () {
  },
  // 生命周期函数--监听页面卸载
  onUnload: function () {
  },
  // 页面相关事件处理函数--监听用户下拉动作
  onPullDownRefresh: function () {
  },
  // 页面上拉触底事件的处理函数
  onReachBottom: function () {
  },
  // 用户点击右上角转发
  onShareAppMessage: function () {
  },
  // 页面滚动触发事件的处理函数
  onPageScroll: function () {
  },
  // 当前是 tab 页时，点击 tab 时触发
  onTabItemTap() {
  }
}
</script>

<style scoped lang='less'>
    .wrap {
        background: #ffffff;
        h3 {
            background: #EAEAF0;
            font-size: .36rem;
            height: .8rem;
            line-height: .8rem;
            color: #666666;
            padding-left: .2rem;
        }
        .item{
    
            font-size: .3rem;
            height: .8rem;
            line-height: .8rem;
            padding-left: .3rem;
        }
        p {
             background: #EAEAF0;
            font-size: .26rem;
            height: .5rem;
            line-height: .5rem;
            color: #666666;
            padding-left: .2rem;
        }
    }
</style>
